package lab02.test11;

/**
 * Created by dell on 2017/10/19.
 */
public class Rectangle implements Printx  {
    //属性：边长、面积、周长
    double sidea;
    double sideb;
    double area;
    double perimeter;
    // 方法：求面积、求周长，显示矩形的边长、面积和周长
    double getarea(){
        return sidea*sideb;
    }
    double getperimeter(){
        return 2*(sidea+sideb);
    }
    double getsidea(){
        return sidea;
    }
    double getsideb(){
        return sideb;
    }
    @Override
    public String  printMyWay() {
return (area+"/"+perimeter+"/"+sidea+"/"+sideb);
    }
}
